home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
eroticos
/
nude-streakers.swf
/
scripts
/
frame_13
/
PlaceObject2_1153_217
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2005-09-23
|
2KB
|
100 lines
onClipEvent(enterFrame){
if(state == "on")
{
this.swapDepths(this._y);
body.stop();
if(_root.speed < 2)
{
cop2cordx = _root.streaker._x;
cop2cordy = _root.streaker._y;
}
cx = int((- (_root.streakerx - _X)) / 3 + (- (_root.streakery - _Y)));
cy = int(- (_root.streakery - _Y) - (- (_root.streakerx - _X)) / 3);
if(Math.abs(cx) < 10 + dive_adj && Math.abs(cy) < 10 + dive_adj)
{
_root.script.streaker_fall();
}
this._x -= Math.cos(angle * 0.0174) * speed;
this._y -= Math.sin(angle * 0.0174) * speed;
chasex = Math.abs(cx) > Math.abs(cy);
chasey = !chasex;
if(chasex == true)
{
us -= 4 * (us > 0);
ds -= 4 * (ds > 0);
if(cx < 0 && ls < max_speed)
{
if(rs + us + ds == 0)
{
ls += 2;
}
temp_angle = -162;
}
else if(ls > 0)
{
ls -= 10;
}
if(cx > 0 && rs < max_speed)
{
if(ls + us + ds == 0)
{
rs += 2;
}
temp_angle = 18;
}
else if(rs > 0)
{
rs -= 10;
}
}
if(chasey == true)
{
ls -= 4 * (ls > 0);
rs -= 4 * (rs > 0);
if(cy > 0 && us < max_speed)
{
if(ls + rs + ds == 0)
{
us += 2;
}
temp_angle = 162;
}
else if(us > 0)
{
us -= 10;
}
if(cy < 0 && ds < max_speed)
{
if(ls + rs + us == 0)
{
ds += 2;
}
temp_angle = -18;
}
else if(ds > 0)
{
ds -= 10;
}
}
if(speed <= 2)
{
this.gotoAndStop((ds > 0) * 1 + (ls > 0) * 2 + (us > 0) * 3 + (rs > 0) * 4);
angle = temp_angle;
body.gotoAndStop(1);
}
if(speed > 0)
{
body.play();
}
speed = ls + rs + us + ds;
ls = Math.max(0,ls);
rs = Math.max(0,rs);
us = Math.max(0,us);
ds = Math.max(0,ds);
}
else
{
body.stop();
}
}